import React,{useState} from 'react';

import Child from './Child'
// 引入之前创建的context对象
import contextObj from '../../../config/context'
// 从context 对象中解构出 Provider 组件
const {Provider} = contextObj
const Father = () => {
   let [count,setCount] = useState(99)

    return (
        <div>
            
            {/* 使用函数子组件 */}
            <Provider value={count}>
               <Child></Child>
            </Provider>
        </div>
    );
}

export default Father;
